import Vue from 'vue'
// 国际化入库
import VueI18n from 'vue-i18n'
// 注册库
Vue.use(VueI18n)

// 引入字典
// element
import elementEN from 'element-ui/lib/locale/lang/en'
import elementZH from 'element-ui/lib/locale/lang/zh-CN'
import menusZH from './zh'
import menusEN from './en'
export default new VueI18n({
  locale: localStorage.getItem('lang') || 'zh',
  messages: {
    zh: {
      morning: '早安!',
      goodDay: '祝你开心每一天!',
      questions: {
        delEmployee: '是否删除员工',
        delRole: '是否删除角色'
      },
      ...elementZH,
      ...menusZH
    },
    en: {
      morning: 'Good Morning!',
      goodDay: 'Have a good day!',
      questions: {
        delEmployee: 'Are you sure?',
        delRole: 'Are you sure?'
      },
      ...elementEN,
      ...menusEN
    }
  }
})

